package com.tj.collection.controller.admin.response;

import com.fqgj.common.api.ResponseData;
import com.tj.collection.db.admin.entity.AdminEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2020/3/4
 * Time: 下午3:02
 */
public class AdminAccountResponse implements ResponseData {

    private List<Item> accountList;

    public AdminAccountResponse(List<AdminEntity> adminEntityList) {
        this.accountList = new ArrayList<>();
        for (AdminEntity entity : adminEntityList) {
            this.accountList.add(new Item(entity.getMerchantCode(), entity.getAccount()));
        }
    }

    private class Item {
        private String merchantCode;
        private String account;

        public Item(String merchantCode, String account) {
            this.merchantCode = merchantCode;
            this.account = account;
        }

        public String getMerchantCode() {
            return merchantCode;
        }

        public Item setMerchantCode(String merchantCode) {
            this.merchantCode = merchantCode;
            return this;
        }

        public String getAccount() {
            return account;
        }

        public Item setAccount(String account) {
            this.account = account;
            return this;
        }
    }

}
